package com.weichen.studentgameexchange.game.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.weichen.studentgameexchange.common.enums.GameStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * <p>
 * 
 * </p>
 *
 * @author 惟尘
 * @since 2025-02-01
 */
@Getter
@Setter
@ToString
@TableName("game")
@Schema(name = "Game对象", description = "")
public class Game implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 游戏ID，主键，唯一标识一个游戏
     */
    @TableId("game_id")
    @Schema(description = "游戏ID，主键，唯一标识一个游戏")
    private Long gameId;

    /**
     * 游戏名字
     */
    @TableField("game_name")
    @Schema(description = "游戏名字")
    private String gameName;

    /**
     * 游戏图片URL，指向游戏的封面图片
     */
    @TableField("game_picture")
    @Schema(description = "游戏图片URL，指向游戏的封面图片")
    private String gamePicture;

    /**
     * 游戏描述，对游戏的简短描述
     */
    @TableField("game_description")
    @Schema(description = "游戏描述，对游戏的简短描述")
    private String gameDescription;


    /**
     * 1-正常 2-下架 3-测试
     */
    @TableField("status")
    @Schema(description = "1-正常 2-下架 3-测试")
    private GameStatus status;

    /**
     * 游戏下载链接
     */
    @TableField("download")
    @Schema(description = "游戏下载链接")
    private String download;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @Schema(description = "修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 逻辑删除
     */
    @TableField("deleted")
    @Schema(description = "逻辑删除")
    private Integer deleted;

    @TableField(exist = false)
    @Schema(description = "收藏总数")
    private Integer collectionCount;

    @TableField(exist = false)
    @Schema(description = "评分总数")
    private Integer gradeCount;

}
